<?php

function smarty_function_article_search($params)
{
	global $smarty;
	
	$groupId = $params['groupId'];
	$descendants = new cf\DescendantGroups($groupId);

	$allProducts = new cf\Products($descendants->IDs()+array($groupId));
	$smarty->assign('allProducts',$allProducts->getList());
	
	return $smarty->fetch("article_search.tpl");
}

?>